package com.ysd.ziyuanshiyongtongji.controller;

import java.util.List;

import javax.annotation.Resource;

import com.ysd.ziyuanshiyongtongji.dao.IStatisticsDao;

import com.ysd.ziyuanshiyongtongji.model.Statistics;
import com.ysd.ziyuanshiyongtongji.util.ChartUtil;
import com.ysd.ziyuanshiyongtongji.util.RoomChartVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.ApiOperation;

/**
 * StatisticsController
 */
@RestController
@RequestMapping("/statistics")
public class StatisticsController {
@Resource
  private IStatisticsDao statisticsDao;
  @ApiOperation(value = "资源室使用统计",notes = "资源室使用统计")
  @GetMapping("/getVo")
  public List<RoomChartVO> getVo(){
    List<Statistics> list =statisticsDao.findAll();
    return ChartUtil.getChart(list);
  }
}